# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_MaximizeConversions do
  @moduledoc """
  An automated bidding strategy to help get the most conversions for your campaigns while spending your budget.

  ## Attributes

  *   `cpcBidCeilingMicros` (*type:* `String.t`, *default:* `nil`) - Maximum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy. Mutable for portfolio bidding strategies only.
  *   `cpcBidFloorMicros` (*type:* `String.t`, *default:* `nil`) - Minimum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy. Mutable for portfolio bidding strategies only.
  *   `targetCpaMicros` (*type:* `String.t`, *default:* `nil`) - The target cost-per-action (CPA) option. This is the average amount that you would like to spend per conversion action specified in micro units of the bidding strategy's currency. If set, the bid strategy will get as many conversions as possible at or below the target cost-per-action. If the target CPA is not set, the bid strategy will aim to achieve the lowest possible CPA given the budget.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :cpcBidCeilingMicros => String.t() | nil,
          :cpcBidFloorMicros => String.t() | nil,
          :targetCpaMicros => String.t() | nil
        }

  field(:cpcBidCeilingMicros)
  field(:cpcBidFloorMicros)
  field(:targetCpaMicros)
end

defimpl Poison.Decoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_MaximizeConversions do
  def decode(value, options) do
    GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_MaximizeConversions.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Common_MaximizeConversions do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
